﻿@model KimPhongCRM.Models.tblTour
@{
    ViewBag.Title = "Tạo tour";
    
@*Get userid*@
    var uid = KimPhongCRM.Lib.SessionData.GetSession("sdUserId").ToString();
    Guid? user_id;
    if (uid != "")
    {
        user_id = new Guid(KimPhongCRM.Lib.SessionData.GetSession("sdUserId").ToString());
    }
    else
    {
        KimPhongCRM.Controllers.BaseController bcontrol = new KimPhongCRM.Controllers.BaseController();
        string un = User.Identity.Name;
        bcontrol.ressUserID(un);
        user_id = new Guid(KimPhongCRM.Lib.SessionData.GetSession("sdUserId").ToString());
    }
@*Get userid*@
    var listUser = ViewData["listUser"] as List<KimPhongCRM.Models.sp_Select_Combobox_User_Result>;
}


<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="row-fluid sortable ui-sortable">
    <div class="box span12">
        <div class="box-header" data-original-title="">
            <h2><i class="icon-edit"></i><span class="break"></span>Thêm khách hàng mới</h2>
            <div class="box-icon">
                <a href="#" class="btn-setting"><i class="icon-wrench"></i></a>
                <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
                <a href="#" class="btn-close"><i class="icon-remove"></i></a>
            </div>
        </div>
        <div class="box-content">
            @using (Html.BeginForm())
            {
                Html.ValidationSummary(true);
                @Html.HiddenFor(model=>model.maTour)
                @Html.HiddenFor(model=>model.ngayNhap)
                @Html.HiddenFor(model=>model.nguoiNhap)
                @Html.Hidden("ngaySuaCuoi",DateTime.Now)
                @Html.Hidden("nguoiSuaCuoi",@user_id)
                @Html.HiddenFor(model => model.maTour)
                <fieldset>
                    <div class="control-group">
                        <label class="control-label">Tên Tour</label>
                        <div class="controls">
                            @Html.TextBoxFor(model => model.tenTour, new { @class = "ui", id = "inputError" })
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Mô tả tour</label>
                        <div class="controls">
                            @Html.TextBoxFor(model => model.moTa, new { @class = "ui", id = "inputError" })
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Giá tour</label>
                        <div class="controls">
                            @Html.TextBoxFor(model => model.giaTien, new { @class = "ui", id = "inputError" })
                        </div>
                    </div>
                    <div class="control-group">
                        @Html.CheckBoxFor(model => model.isActive)
                        @Html.LabelFor(model => model.isActive, "Active")
                    </div>

                    <div class="form-actions">
                        <button type="submit" class="ui btn btn-primary">Lưu thông tin</button>
                    </div>
                </fieldset>
            }
        </div>
    </div>
    <!--/span-->

</div>
